import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
    plugins: [vue()],

    server: {
        open: false,
        host: '0.0.0.0',
        port: 9002,
        proxy: {
            '/api': {
                // target: 'http://101.201.83.5:9001',
                target: 'http://localhost:9001/',
                changeOrigin: true,
                rewrite(path) {
                    return path.replace(/^\/api/, '')
                }
            }
        }
    }
})
